<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Test page for G2B calls to MED EAT environment -->
<html>
<head>
  <title>MBIE G2B Submit XML Request for the PPSR</title>
  <META http-equiv=Content-Type content="text/html;">
<script language="javascript">
  function submitFileEatJava() {
    document.file_form.action = "https://xml.eat.g2b.govt.nz/ppsr-xml/gateway.svt";
    document.file_form.submit();
  }

  function submitTextEatJava() {
    document.text_form.action = "https://xml.eat.g2b.govt.nz/ppsr-xml/gateway.svt";
    document.text_form.submit();
  }
   
   function submitFileProdJava() {
    document.file_form.action = "https://xml.g2b.govt.nz/ppsr-xml/gateway.svt";
    document.file_form.submit();
  }
  function submitTextProdJava() {
    document.text_form.action = "https://xml.g2b.govt.nz/ppsr-xml/gateway.svt";
    document.text_form.submit();
  }
</script>
<link rel="stylesheet" type="text/css" href="services.css"/>
</head>
<body>
<h1>MBIE G2B Submit XML Request for the PPSR</h1>
<form action="dummy_file" method="post"
    encType="multipart/form-data" name="file_form">
  <P>XML File to Submit: <input type="file" name="p_xml_file">  
  <input type="button" value="Send File to EAT" onClick="submitFileEatJava();">
  <input type="button" name="submitButton" value="Send file to Prod" onClick="submitFileProdJava();">
</form>
<hr/>
<p>XML Text to Submit:</p>
<form action="dummy_text" method="post" name="text_form">
  <textarea name="p_xml_file" rows="20" wrap="VIRTUAL" cols="85"></textarea>  <br/>
  <input type="button" value="Send Text to EAT" onClick="submitTextEatJava();">
  <input type="button" name="submitButton" value="Send Text to Prod" onClick="submitTextProdJava();">
</form>
<hr/>
<div id="help">
<h2>Certificates</h2>
<p>This should just work in IE or Chrome once you have installed your personal Certificate on your machine. You can do this (on Windows) by double clicking te certificate file and following the import instructions</p>
<p>If you use Firefox, you may need to import the certificate into the browser from the Tools -> Options -> Advanced -> View Certificates -> Import menu</p>
</div>
<div>
<h2>Sample Queries</h2>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="FINANCE_STATEMENT" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;finance_statement_criteria&gt;
    &lt;fs fs_no="F83928JR92ND046V"/&gt;
  &lt;/finance_statement_criteria&gt;
&lt;/transaction&gt;</pre>

<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="FINANCE_STATEMENT" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;finance_statement_criteria&gt;
    &lt;fs fs_no="FR09T2X0V438M440"/&gt;
  &lt;/finance_statement_criteria&gt;
&lt;/transaction&gt;</pre>

<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="DEBTOR" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;debtor_criteria&gt;
    &lt;db_person&gt;
      &lt;first_name&gt;NANA&lt;/first_name&gt;
      &lt;middle_names&gt;OLD&lt;/middle_names&gt;
      &lt;last_name&gt;DODDERY&lt;/last_name&gt;
      &lt;date_of_birth&gt;01-01-1930&lt;/date_of_birth&gt;
    &lt;/db_person&gt;
    &lt;city_town&gt;AUCKLAND&lt;/city_town&gt;
  &lt;/debtor_criteria&gt;
&lt;/transaction&gt;
</pre>

<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="DEBTOR" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;debtor_criteria&gt;
    &lt;db_organisation&gt;
      &lt;org_name&gt;BUSINESS&lt;/org_name&gt;
      &lt;db_person_acting&gt;
        &lt;first_name&gt;JOE&lt;/first_name&gt;
        &lt;middle_names&gt;WILLIAM&lt;/middle_names&gt;
        &lt;last_name&gt;SMITH&lt;/last_name&gt;
        &lt;city_town&gt;AUCKLAND&lt;/city_town&gt;
      &lt;/db_person_acting&gt;
    &lt;/db_organisation&gt;
  &lt;/debtor_criteria&gt;
&lt;/transaction&gt;</pre>

<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="DEBTOR" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;debtor_criteria&gt;
    &lt;db_organisation&gt;
      &lt;company_number&gt;123456&lt;/company_number&gt;
    &lt;/db_organisation&gt;
  &lt;/debtor_criteria&gt;
&lt;/transaction&gt;</pre>

<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="DEBTOR" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;debtor_criteria&gt;
    &lt;db_organisation&gt;
      &lt;company_number&gt;123456&lt;/company_number&gt;
    &lt;/db_organisation&gt;
  &lt;/debtor_criteria&gt;
  &lt;collateral_criteria&gt;
    &lt;collateral type='MV' /&gt;
  &lt;/collateral_criteria&gt;
&lt;/transaction&gt;</pre>

<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="MOTOR_VEHICLE" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;motor_vehicle_criteria&gt;
    &lt;vehicle reg_no="553456" chassis="12345675501234567" vin="12345675501234567" /&gt;
  &lt;/motor_vehicle_criteria&gt;
&lt;/transaction&gt;</pre>

<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;transaction type="PPSR_SEARCH" are_you_performing_search_for_legitimate_reasons="Y" by="AIRCRAFT" client_ref="TEST_PPSR_SEARCH" billing_reference="TEST_PPSR_SEARCH"&gt;
  &lt;aircraft_criteria&gt;
    &lt;aircraft registration_mark="2001" manufacturer_serial="ABC" /&gt;
  &lt;/aircraft_criteria&gt;
&lt;/transaction&gt;
</pre>
</div>
</body>
</html>
